package com.skillscompetition.skillscompetition.common;

import java.util.HashMap;
import java.util.Map;

public class ResponseType {
    public static Map<String,Object> success(Object obj){
        Map<String,Object> map=new HashMap<>();
        map.put("code",200);
        map.put("msg","操作成功");
        if(obj!=null){
            map.put("data",obj);
        }
        return map;
    }


    public static Map<String,Object> fail(){
        Map<String,Object> map=new HashMap<>();
        map.put("code",500);
        map.put("msg","操作失败");
        return map;
    }
}
